import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/get?${stringify(params)}`);
}


export async function insertForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProSystem(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProSystemAuth(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function queryPageForProAuthority(params = {}) {
<<<<<<< HEAD
    return request(`/hrath/web/api/service/proauthority/queryPage`, {
=======
    return request(`/${webpath}/web/api/service/proauthority/queryPage`, {
>>>>>>> d8eca5bfb0c3fdab190e7955baa5788118c6937e
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function getPageProSystemByAuthId(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/getPageProSystemByAuthId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function queryPageForProSystemChild(params = {}) {
    return request(`/${webpath}/web/api/service/prosystem/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function getSelectedProSystemByAuthId(params = {}) {
    return request(`/${webpath}/web/api/service/prosystemauth/getSelectedProSystemByAuthId`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

